@layout("/common/_container.html",{bg:"bg-white",js:["/assets/modular/banner/banner_edit.js"]}){
<form id="bannerForm" lay-filter="bannerForm" class="layui-form model-form">
    <input name="id" type="hidden"/>
    <!--pic  name="商品图片" 标签名称
     boxid="bannerBox" 包含 button，img,input //用于封装的方法
     imgName="image" img的name属性 //用于ajax渲染使用
     uploadButton="hello" 上传按钮的id ，不填则没有上传按钮
       -->
    <#pic  name="商品图片"  boxid="bannerBox" imgName="image" hiddenInput="image"  uploadButton="hello" />
    <div class="layui-form-item">
        <label class="layui-form-label">标题<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="title" name="title" placeholder="请输入标题" type="text" class="layui-input" lay-verify="required" required/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">副标题</label>
        <div class="layui-input-block">
            <input id="subTitle" name="subTitle" placeholder="请输入副标题" type="text" class="layui-input" lay-verify="required" />
        </div>
    </div>

    <div class="layui-form-item oneItem" id="goodsItem"   style="display:none;">
        <label class="layui-form-label">商品<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <select name="goodsId" lay-filter="goodsList" required>
                <option  value="">请选择商品</option>
                @for(goods in  goodsList){
                    <option value="${goods.id}">${goods.name}</option>
                @}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input  name="status"  type="radio" class="layui-input" title="显示"   value='true' lay-verify="required"  required/>
            <input  name="status"  type="radio" class="layui-input" title="隐藏"   value='false' lay-verify="required"  required/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">资源类型<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input type="radio"  name="isBanner" lay-filter="isBanner" value="0"   title="其他" />
            <input type="radio"  name="isBanner" lay-filter="isBanner" value="1"   title="社区首页" />
            <input type="radio" name="isBanner" lay-filter="isBanner" value="2"    title="商城首页" />
        </div>
    </div>
   <!-- <div class="layui-form-item">
        <label class="layui-form-label">视频<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input type="checkbox" id="isVideo" name="isVideo" lay-filter="isVideo" value=1 lay-skin="switch"  lay-text="是|否"   />
        </div>
    </div>-->
    <div class="layui-form-item">
        <label class="layui-form-label">跳转方向<span style="color: red;">*</span></label>
        <div class="layui-input-block"  >
            <input  name="linkWay"  lay-filter="way" type="radio" class="layui-input" title="商品"   value="1"   required/>
            <input  name="linkWay"  lay-filter="way" type="radio" class="layui-input" title="文章"   value="2"   required/>
            <input  name="linkWay"   lay-filter="way" type="radio" class="layui-input" title="链接跳转"   value="3"   required/>

        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="weigh" name="weigh" placeholder="请输入排序" type="text" class="layui-input" lay-verify="required" required/>
        </div>
    </div>

    <div class="layui-form-item oneItem" id="urlItem" style="display:none;">
        <label class="layui-form-label">url<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="url" name="url" placeholder="请输入url" type="text" class="layui-input"  />
        </div>
    </div>
    <div class="layui-form-item oneItem" id="contentItem" style="display:none;">
        <div id="editorVal" style="display:none;">
        </div>
        <blockquote  style="text-align: center">
            文章内容
        </blockquote>
        <div >
            <div id="description_toolbar" class="toolbar">
            </div>
            <div id="description_text" class="text" style="height: 400px;border: 1px solid seagreen">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">创建时间<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="createTime" name="createTime" placeholder="请输入创建时间" type="text" class="layui-input" lay-verify="required" disabled />
        </div>
    </div>
    <div class="layui-form-item text-right">
        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>保存</button>
    </div>
</form>
@}